package com.yaoxiaowen.project2.test.recycler_view;

import android.content.Context;
import android.support.annotation.LayoutRes;
import android.widget.TextView;

import com.yaoxiaowen.project2.R;
import com.yaoxiaowen.project2.util.log.debug.LogInterface;
import com.yaoxiaowen.project2.util.log.debug.LogTool;
import com.yaoxiaowen.project2.util.log.debug.ShowInterface;

/**
 * Created by Administrator on 2016/12/31.
 */

public class HeadFootAdapter extends HeaderFooterCommonAdapter<String>{

    public static final String TAG = "HeadFootAdapter";
    private static final LogInterface mLog = LogTool.getLogType();
    private static final boolean DEBUG = true;
    private static final boolean IS_SHOW = true;
    private static ShowInterface mShow;

    private Context mContext;

    public HeadFootAdapter(Context mContext, @LayoutRes int mLayoutResId) {
        super(mContext, mLayoutResId);
        this.mContext = mContext;
        mShow = LogTool.getShowType(mContext);
    }

    @Override
    public void convertHeadOrFoot(CommonViewHolder holder, boolean isHead) {
//        if (isHead){
//            TextView headerTv = holder.getView(R.id.itemTestRecyclerHeaderTextView);
//            headerTv.setText("covert 设置header");
//            return;
//        }
//
//        TextView footerTv = holder.getView(R.id.itemTestRecyclerFooterTextView);
//        footerTv.setText("convert 设置  footer");
//        return;
    }

    @Override
    protected void convert(CommonViewHolder holder, String data) {
        TextView tv = holder.getView(R.id.itemTestRecyclerTextView);
        tv.setText(data);
    }

}
